---
id: migrate
title: Migrate to V2
sidebar_label: Migrate to V2
---

Angular Three v2 is utilizing [Angular Signals](https://angular.io/guide/signals) under the hood so there are some fundamental changes
as to how things work

### `NgtStore`

`NgtStore` utilizes Signal APIs that returns reactive properties as `Signal<Type>` instead of `Observable<Type>`. Check out [Store](../api/store) for more information

```ts
export class Scene {
    readonly #store = inject(NgtStore);

    // before
    readonly camera$ = this.#store.select('camera'); // Observable<NgtCamera>
    readonly glDom$ = this.#store.select('gl', 'domElement'); // Observable<HTMLElement>
    readonly orbitControlsArgs$ = combineLatest([this.camera$, this.glDom$]); // Observable<[NgtCamera, HTMLElement]>

    // after
    readonly #camera = this.#store.select('camera'); // Signal<NgtCamera>
    readonly #glDom = this.#store.select('gl', 'domElement'); // Signal<HTMLElement>
    readonly orbitControlsArgs = computed(() => [this.#camera(), this.#glDom()]); // Signal<[NgtCamera, HTMLElement]>
}
```

### `NgtPush`

With Signals, we do not need `NgtPush` pipe anymore so this pipe is removed

```html
<!-- before -->
<ngt-primitive *args="[model$ | push]" />
<!-- after -->
<ngt-primitive *args="[model()]" />
```
